<?php


namespace app\mweb\controller;


use app\admin\model\UserPvLog;
use app\common\Common;
use think\facade\Validate;
use think\Request;

class User extends Common
{
    // 浏览记录
    public function pvList(Request $request)
    {
        $data = $request->param();
        $validate = Validate::make([
            "chat_id|聊天id" => "require",
            "user_no|用户编号" => "require"
        ]);
        if (!$validate->check($data)) {
            return failedJson($validate->getError());
        }
        $log = UserPvLog::logList($data["user_no"],$data["chat_id"]);
        return successJson("success",$log);
    }
}